<template>
  <div class="home-container">
    <div class="welcome-section">
      <h1>欢迎使用</h1>
      <p>移动端管理系统</p>
    </div>
    
    <div class="quick-actions">
      <el-card class="action-card" shadow="hover" @click="goToTasks">
        <div class="action-content">
          <el-icon class="action-icon"><List /></el-icon>
          <div class="action-text">
            <h3>我的任务</h3>
            <p>查看和管理您的任务</p>
          </div>
        </div>
      </el-card>
      
      <el-card class="action-card" shadow="hover" @click="goToAIService">
        <div class="action-content">
          <el-icon class="action-icon"><Service /></el-icon>
          <div class="action-text">
            <h3>AI客服</h3>
            <p>智能客服助手</p>
          </div>
        </div>
      </el-card>
      
      <el-card class="action-card" shadow="hover" @click="goToTeam">
        <div class="action-content">
          <el-icon class="action-icon"><OfficeBuilding /></el-icon>
          <div class="action-text">
            <h3>班组管理</h3>
            <p>团队协作管理</p>
          </div>
        </div>
      </el-card>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { List, Service, OfficeBuilding } from '@element-plus/icons-vue'

const router = useRouter()

const goToTasks = () => {
  router.push('/main/my-tasks')
}

const goToAIService = () => {
  router.push('/main/ai-service')
}

const goToTeam = () => {
  router.push('/main/team')
}
</script>

<style scoped>
.home-container {
  padding: 0;
}

.welcome-section {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
}

.welcome-section h1 {
  color: #333;
  margin: 0 0 8px 0;
  font-size: 1.8em;
  font-weight: 600;
}

.welcome-section p {
  color: #666;
  margin: 0;
  font-size: 1.1em;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.action-card {
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 12px;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.action-content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.action-icon {
  font-size: 2em;
  color: #409EFF;
  flex-shrink: 0;
}

.action-text h3 {
  margin: 0 0 4px 0;
  color: #333;
  font-size: 1.2em;
  font-weight: 600;
}

.action-text p {
  margin: 0;
  color: #666;
  font-size: 0.95em;
}

/* 移动端优化 */
@media (max-width: 600px) {
  .welcome-section {
    margin-bottom: 24px;
    padding: 16px 0;
  }
  
  .welcome-section h1 {
    font-size: 1.6em;
  }
  
  .welcome-section p {
    font-size: 1em;
  }
  
  .quick-actions {
    gap: 12px;
  }
  
  .action-content {
    gap: 12px;
    padding: 6px 0;
  }
  
  .action-icon {
    font-size: 1.8em;
  }
  
  .action-text h3 {
    font-size: 1.1em;
  }
  
  .action-text p {
    font-size: 0.9em;
  }
}

@media (max-width: 375px) {
  .welcome-section {
    margin-bottom: 20px;
    padding: 12px 0;
  }
  
  .welcome-section h1 {
    font-size: 1.4em;
  }
  
  .welcome-section p {
    font-size: 0.95em;
  }
  
  .quick-actions {
    gap: 10px;
  }
  
  .action-content {
    gap: 10px;
  }
  
  .action-icon {
    font-size: 1.6em;
  }
  
  .action-text h3 {
    font-size: 1em;
  }
  
  .action-text p {
    font-size: 0.85em;
  }
}
</style> 